#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@File    :   NRC22_Phy_test.py
@Time    :   2024/08/16 13:31:28
@Author  :   YangLiang
@Version :   1.0
@Contact :   yangliang@chengtech.com
@License :   (C)Copyright 2022-2025
@Desc    :   None
'''

# here put the import lib
from pickle import TRUE
from pytest_assume.plugin import assume

import pytest
import logging
import time
import requests
from sympy import I
# from sympy import assuming
from commDriver.TS_CAN import *
import allure
import sys
from collections.abc import Iterable

from sqlalchemy import false
sys.dont_write_bytecode = True


CommunicationControl = [([0x28, 0x00, 0x01],[0x7F, 0x28, 0x22],[0x68]),
                        ([0x28, 0x01, 0x01],[0x7F, 0x28, 0x22],[0x68]),
                        ([0x28, 0x03, 0x01],[0x7F, 0x28, 0x22],[0x68]),
                        ([0x28, 0x80, 0x01],[0x7F, 0x28, 0x22],[]),
                        ([0x28, 0x81, 0x01],[0x7F, 0x28, 0x22],[]),
                        ([0x28, 0x83, 0x01],[0x7F, 0x28, 0x22],[]),
                        ]


ControlDTCSetting = [   ([0x85, 0x01],[0x7F, 0x85, 0x22],[0xC5]),
                        ([0x85, 0x02],[0x7F, 0x85, 0x22],[0xC5]),
                        ([0x85, 0x81],[0x7F, 0x85, 0x22],[]),
                        ([0x85, 0x82],[0x7F, 0x85, 0x22],[]),
                        ]


@allure.severity('critical')
class Test_NRC22_Phy(object):

     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_UnderVoltage_Programming_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_UnderVoltage_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_OverVoltage_Programming_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     
     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_OverVoltage_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x11 Service Undervoltage condition ')
     @allure.description('Test 0x11 Service Undervoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_UnderVoltage_Programming_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)


     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x11 Service Undervoltage condition ')
     @allure.description('Test 0x11 Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_UnderVoltage_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     @allure.title('Test 0x11 Service OverVoltage condition ')
     @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_OverVoltage_Programming_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     @allure.title('Test 0x11 Service OverVoltage condition ')
     @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_OverVoltage_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     
     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_UnderVoltage_Programming_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)


     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_UnderVoltage_Extended_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)
     
     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_OverVoltage_Programming_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)
     
     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_OverVoltage_Extended_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_UnderVoltage_Programming_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_UnderVoltage_Extended_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)
     
     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_OverVoltage_Programming_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_OverVoltage_Extended_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)


     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x31 Service Undervoltage condition ')
     @allure.description('Test 0x31 Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID31_UnderVoltage_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '7F3122', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '71', 0, iStep, False)


     @allure.title('Test 0x31 Service OverVoltage condition ')
     @allure.description('Test 0x31 Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID31_OverVoltage_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '7F3122', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '71', 0, iStep, False)

     @allure.title('Test 0x10 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x10 Service Vspeed over 3kph confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_OverVspeed_Programming_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)

          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.title('Test 0x10 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x10 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_OverVspeed_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)

          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.title('Test 0x1101 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_OverVspeed_Programming_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)
          time.sleep(1)
          #设置车速
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          time.sleep(0.5)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     @allure.title('Test 0x1101 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_OverVspeed_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)
          time.sleep(1)
          #设置车速
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          time.sleep(0.5)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.title('Test 0x28 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x28 Service Vspeed over 3kph confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_OverVspeed_Programming_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x00], [0x7E, 0x00], 2, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)

          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.title('Test 0x28 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x28 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_OverVspeed_Extended_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x00], [0x7E, 0x00], 3, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)

          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.title('Test 0x85 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x85 Service Vspeed over 3kph confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_OverVspeed_Programming_Phy(self, action, Driver, req, resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x00], [0x7E, 0x00], 2, iStep, False)

          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)
          
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.title('Test 0x85 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x85 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_OverVspeed_Extended_Phy(self, action, Driver, req, resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x00], [0x7E, 0x00], 3, iStep, False)

          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)
          
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     
     @allure.title('Test 0x31 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x31 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID31_OverVspeed_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x10, 0x03], [0x50, 0x03, 0x00, 0x32, 0x01, 0xF4], 0, iStep, False)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x00], [0x7E, 0x00], 0, iStep, False)

          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)
          
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x31,0x01,0x02,0x03], [0x7F,0x31,0x22], 0, iStep, False)

          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '71', 0, iStep, False)




     @allure.title('Test 0x10 Service undervoltage boundary condition ')
     @allure.description('Test 0x10 Service undervoltage boundary confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_undervoltage_boundary_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.9, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x10, 0x02], [0x50, 0x02], 0, iStep, False)
          time.sleep(0.3)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)

          iStep = Driver['CAN'].SetVolt(Driver, 6.8, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x22, 0x02,0x85], [0x62, 0x02,0x85], 0, iStep, False)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x10, 0x02], [0x50, 0x02], 0, iStep, False)
          time.sleep(0.3)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)

          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x10, 0x02], [0x7F, 0x10, 0x22], 0, iStep, False)
          time.sleep(0.3)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 0.5, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x10, 0x02], [0x50, 0x02], 0, iStep, False)

     @allure.title('Test 0x10 Service overvoltage boundary condition ')
     @allure.description('Test 0x10 Service 0vervoltage boundary confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_overvoltage_boundary_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)

          iStep = Driver['CAN'].SetVolt(Driver, 17.1, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 17.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x22, 0x02,0x85], [0x62, 0x02,0x85], 0, iStep, False)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)

          iStep = Driver['CAN'].SetVolt(Driver, 18.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     
     '''P档下NRC22'''
     @allure.title('Test 0x1101 Service Gear Not P ')
     @allure.description('Test 0x1101 Service Gear Not P response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_GearNotP_Programming_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 2, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',2,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)
          time.sleep(1)
          #设置车速
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',1,iStep)
          time.sleep(0.5)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     @allure.title('Test 0x1101 Service Gear Not P ')
     @allure.description('Test 0x1101 Service Gear Not P response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_GearNotP_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',2,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)
          time.sleep(1)
          #设置车速
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',1,iStep)
          time.sleep(0.5)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.title('Test 0x28 Service Gear Not P ')
     @allure.description('Test 0x28 Service Gear Not P response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_GearNotP_Programming_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x00], [0x7E, 0x00], 2, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',2,iStep)

          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',1,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.title('Test 0x28 Service Gear Not P ')
     @allure.description('Test 0x28 Service Gear Not P response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_GearNotP_Extended_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x00], [0x7E, 0x00], 3, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',2,iStep)

          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',1,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     @allure.title('Test 0x31 Service Gear Not P')
     @allure.description('Test 0x31 Service Gear Not P response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID31_GearNotP_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x10, 0x03], [0x50, 0x03, 0x00, 0x32, 0x01, 0xF4], 0, iStep, False)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x00], [0x7E, 0x00], 0, iStep, False)

          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',2,iStep)
          
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x31,0x01,0x02,0x03], [0x7F,0x31,0x22], 0, iStep, False)

          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',1,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '71', 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.title('Test 0x85 Service Gear Not P ')
     @allure.description('Test 0x85 Service Gear Not P response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_GearNotP_Programming_Phy(self, action, Driver, req, resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x00], [0x7E, 0x00], 2, iStep, False)

          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',2,iStep)
          
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',1,iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.title('Test 0x85 Service Gear Not P ')
     @allure.description('Test 0x85 Service Gear Not P response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_GearNotP_Extended_Phy(self, action, Driver, req, resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x00], [0x7E, 0x00], 3, iStep, False)

          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',2,iStep)
          
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('VCU_0x342','VCU_Goal_Gear_S',1,iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)


     '''3E 80'''
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_Undervoltage_Programming_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_Undervoltage_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_OverVoltage_Programming_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_OverVoltage_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x11 Service Undervoltage condition ')
     @allure.description('Test 0x11 Service Undervoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_UnderVoltage_Programming_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x11 Service Undervoltage condition ')
     @allure.description('Test 0x11 Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_UnderVoltage_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     @allure.title('Test 0x11 Service OverVoltage condition ')
     @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_OverVoltage_Programming_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     @allure.title('Test 0x11 Service OverVoltage condition ')
     @allure.description('Test 0x11 Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_OverVoltage_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)


     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_UnderVoltage_Programming_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_UnderVoltage_Extended_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)
     
     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_OverVoltage_Programming_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_OverVoltage_Extended_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_UnderVoltage_Programming_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x10 Service Undervoltage condition ')
     @allure.description('Test 0x10 Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_UnderVoltage_Extended_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)
     
     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_OverVoltage_Programming_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)
     
     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.title('Test 0x10 Service OverVoltage condition ')
     @allure.description('Test 0x10 Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_OverVoltage_Extended_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)


     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x31 Service Undervoltage condition ')
     @allure.description('Test 0x31 Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID31_UnderVoltage_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '7F3122', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '71', 0, iStep, False)


     @allure.title('Test 0x31 Service OverVoltage condition ')
     @allure.description('Test 0x31 Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID31_OverVoltage_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '7F3122', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '71', 0, iStep, False)

     @allure.title('Test 0x10 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x10 Service Vspeed over 3kph confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_OverVspeed_Programming_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)

          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.title('Test 0x10 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x10 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_OverVspeed_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)

          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.title('Test 0x1101 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_OverVspeed_Programming_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 2, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)
          time.sleep(1)
          #设置车速
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          time.sleep(0.5)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     @allure.title('Test 0x1101 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x1101 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID11_OverVspeed_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '7F1122', 0, iStep, False)
          time.sleep(1)
          #设置车速
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          time.sleep(0.5)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1101', '5101', 0, iStep, False)

     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.title('Test 0x28 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x28 Service Vspeed over 3kph confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_OverVspeed_Programming_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x80], [], 2, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)

          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in CommunicationControl]
     @allure.title('Test 0x28 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x28 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', CommunicationControl, ids=ids)
     def test_SID28_OverVspeed_Extended_Send3E80_Phy(self, action, Driver,req,resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x80], [], 3, iStep, False)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)

          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)
          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.title('Test 0x85 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x85 Service Vspeed over 3kph confition response NRC22 in programming session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_OverVspeed_Programming_Send3E80_Phy(self, action, Driver, req, resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x80], [], 2, iStep, False)

          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)
          
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     ids = ["Request {}".format(binascii.b2a_hex(bytearray(req), ' '))for req,resp,resp2 in ControlDTCSetting]
     @allure.title('Test 0x85 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x85 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     @pytest.mark.parametrize('req,resp,resp2', ControlDTCSetting, ids=ids)
     def test_SID85_OverVspeed_Extended_Send3E80_Phy(self, action, Driver, req, resp,resp2):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x80], [], 3, iStep, False)

          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)
          
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp, 0, iStep, False)

          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, req, resp2, 0, iStep, False)

     @allure.title('Test 0x31 Service Vspeed over 3kph condition ')
     @allure.description('Test 0x31 Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID31_OverVspeed_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x10, 0x03], [0x50, 0x03, 0x00, 0x32, 0x01, 0xF4], 0, iStep, False)
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x3E, 0x80], [], 0, iStep, False)

          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)
          
          iStep,uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x31,0x01,0x02,0x03], [0x7F,0x31,0x22], 0, iStep, False)

          #设置车速为0KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '31010203', '71', 0, iStep, False)


     @allure.title('Test 0x10 Service undervoltage boundary condition ')
     @allure.description('Test 0x10 Service undervoltage boundary confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_undervoltage_boundary_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 7.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x10, 0x02], [0x50, 0x02], 0, iStep, False)
          time.sleep(0.3)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)

          iStep = Driver['CAN'].SetVolt(Driver, 7.2, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x10, 0x02], [0x50, 0x02], 0, iStep, False)
          time.sleep(0.3)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)

          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, [0x10, 0x02], [0x7F, 0x10, 0x22], 0, iStep, False)
          time.sleep(0.3)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 0.5, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     @allure.title('Test 0x10 Service overvoltage boundary condition ')
     @allure.description('Test 0x10 Service 0vervoltage boundary confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID10_overvoltage_boundary_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)

          iStep = Driver['CAN'].SetVolt(Driver, 16.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 17.8, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)

          iStep = Driver['CAN'].SetVolt(Driver, 18.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '7F1022', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '1002', '5002', 0, iStep, False)

     '''0x2E'''
     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x2E Service Undervoltage condition ')
     @allure.description('Test 0x2E Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID2E_UnderVoltage_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '7F2E22', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '6E3401', 0, iStep, False)

     @allure.title('Test 0x2E Service OverVoltage condition ')
     @allure.description('Test 0x2E Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID2E_OverVoltage_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '7F2E22', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '6E3401', 0, iStep, False)

     @allure.title('Test 0x2E Service Vspeed over 3kph condition ')
     @allure.description('Test 0x2E Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID2E_OverVspeed_Extended_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E00', '7E00', 3, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '7F2E22', 0, iStep, False)

          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '6E3401', 0, iStep, False)



     @allure.story('ECU NRC 22 Test')
     @allure.title('Test 0x2E Service Undervoltage condition ')
     @allure.description('Test 0x2E Service Undervoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID2E_Undervoltage_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 6.3, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '7F2E22', 0, iStep, False)

          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '6E3401', 0, iStep, False)

     @allure.title('Test 0x2E Service OverVoltage condition ')
     @allure.description('Test 0x2E Service OverVoltage confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID2E_OverVoltage_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          iStep = Driver['CAN'].SetVolt(Driver, 18.5, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 0, iStep, False)
          time.sleep(1)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '7F2E22', 0, iStep, False)
          iStep = Driver['CAN'].SetVolt(Driver, 12, 1, iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '6E3401', 0, iStep, False)
	
     @allure.title('Test 0x2E Service Vspeed over 3kph condition ')
     @allure.description('Test 0x2E Service Vspeed over 3kph confition response NRC22 in extended session with physical addressing')
     @allure.testcase('Test cases address:https://chengtech.pingcode.com/testhub/libraries/630357052177ea2394680877/cases')
     def test_SID2E_OverVspeed_Extended_Send3E80_Phy(self, action, Driver):
          iStep = 1
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '3E80', '', 3, iStep, True)
          #设置车速大于3KM/H
          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',80,iStep)

          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '7F2E22', 0, iStep, False)

          iStep = Driver['CAN'].setSignalValue('IPB_0x121','IPB_Vehicle_Speed_S',0,iStep)
          iStep, uds_resp, size = Driver['CAN'].checkReqResp(Driver, '2E340100', '6E3401', 0, iStep, False)